﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;

namespace ManagedUpload
{
    class JsonUtils
    {
        private static readonly JavaScriptSerializer JSON = new JavaScriptSerializer();

        public static string ToJson(object obj)
        {
            return JSON.Serialize(obj);
        }

        public static object FromJson(string json,Type type)
        {
            return JSON.Deserialize(json, type);
        }
    }
}
